import { GCellRenderer } from "../../../../../../com/mui/controls/GCellRenderer";
import { ObjCreate } from "../../../common/ObjCreate";
import { GlobalStyle } from "../../../../../common/global/GlobalStyle";
import { ImagesConst } from "../../../../resource/ImagesConst";
import { SRobCityThreeJoinTeam } from "../../../../../../Message/Public/SRobCityThreeJoinTeam";
import { EntityUtil } from "../../../../scene/layer/utils/EntityUtil";
import { Language } from "../../../../../../extend/language/Language";
import { GTextFiled } from "../../../../../../com/mui/controls/GTextFiled";
//class GuildRobCityCopyThreeResultRenderer
    
    export  class GuildRobCityCopyThreeResultRenderer extends GCellRenderer
    {
        constructor()
        {
            super();
            this._guildNameLabel = ObjCreate.createGTextField("", 0, 0, 150, 20, this, GlobalStyle.textFormatWhite);
            this._leadNameLabel = ObjCreate.createGTextField("", 150, 0, 180, 20, this, GlobalStyle.textFormatWhite);
            ObjCreate.createBg(0, 20, 330, 2, this, ImagesConst.SplitLine);
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            super.data = arg1;
            var loc1=arg1 as SRobCityThreeJoinTeam;
            if (loc1) 
            {
                this._guildNameLabel.htmlText = "[" + EntityUtil.getProxyName(loc1.sEntityId) + "]" + loc1.guildName;
                if (loc1.shaBak > 0) 
                {
                    this._leadNameLabel.htmlText = Language.getString(60969) + " " + loc1.leaderName + "（" + Language.getString(60971) + "）";
                }
                else 
                {
                    this._leadNameLabel.htmlText = Language.getString(60969) + " " + loc1.leaderName;
                }
            }
            return;
        }

        /* internal */ /* var */_guildNameLabel: GTextFiled;

        /* internal */ /* var */_leadNameLabel: GTextFiled;
    }
